fix compilation breaking when compiling time.c with FRAME_POINTER on x86_64
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 1 Feb 2006 13:46:15 +0000 (13:46 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 1 Feb 2006 13:46:15 +0000 (13:46 +0000)
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c

index 78e7fb0010f8f26a91bade0168a9eed50fc9de18..32a53bfaae91ba1d9bbad9c8cb3a46d491071719 100644 (file)
@@ -541,16 +541,22 @@ unsigned long long sched_clock(void)
 }
 
 #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
+#ifdef __x86_64__
+#define REG_BP rbp
+#else
+#define REG_BP ebp
+#endif
 unsigned long profile_pc(struct pt_regs *regs)
 {
        unsigned long pc = instruction_pointer(regs);
 
        if (in_lock_functions(pc))
-               return *(unsigned long *)(regs->ebp + 4);
+               return *(unsigned long *)(regs->REG_BP + 4);
 
        return pc;
 }
 EXPORT_SYMBOL(profile_pc);
+#undef REG_BP
 #endif
 
 irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)